package com.activity.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Service;

import com.activity.dao.SavePackageDao;
import com.activity.model.Packages;

@Service("savePackageDao")
public class SavePackageDaoImpl extends SqlSessionDaoSupport implements SavePackageDao {
	@Resource
	@Override
	public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
		// TODO Auto-generated method stub
		super.setSqlSessionFactory(sqlSessionFactory);
	}
	@Override
	public List<Packages> querypackages() {
		SqlSession session = getSqlSession();
		String statement = "com.activity.mapper.PackageMapper.querypackages";
		List<Packages> list =session.selectList(statement);

		return list;
	}
}
